package milkproduction.to;

public class MilkTO {
	int milkNo;
	int rowMilkNo;
	int capacity;
	int disposal;
	String sterilizeFinishDate;
	
	public MilkTO(){}

	public MilkTO(int milkNo, int rowMilkNo, int capacity, int disposal,
			String sterilizeFinishDate) {
		super();
		this.milkNo = milkNo;
		this.rowMilkNo = rowMilkNo;
		this.capacity = capacity;
		this.disposal = disposal;
		this.sterilizeFinishDate = sterilizeFinishDate;
	}

	public int getMilkNo() {
		return milkNo;
	}

	public void setMilkNo(int milkNo) {
		this.milkNo = milkNo;
	}

	public int getRowMilkNo() {
		return rowMilkNo;
	}

	public void setRowMilkNo(int rowMilkNo) {
		this.rowMilkNo = rowMilkNo;
	}

	public int getCapacity() {
		return capacity;
	}

	public void setCapacity(int capacity) {
		this.capacity = capacity;
	}

	public int getDisposal() {
		return disposal;
	}

	public void setDisposal(int disposal) {
		this.disposal = disposal;
	}

	public String getSterilizeFinishDate() {
		return sterilizeFinishDate;
	}

	public void setSterilizeFinishDate(String sterilizeFinishDate) {
		this.sterilizeFinishDate = sterilizeFinishDate;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + capacity;
		result = prime * result + disposal;
		result = prime * result + milkNo;
		result = prime * result + rowMilkNo;
		result = prime
				* result
				+ ((sterilizeFinishDate == null) ? 0 : sterilizeFinishDate
						.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		MilkTO other = (MilkTO) obj;
		if (capacity != other.capacity)
			return false;
		if (disposal != other.disposal)
			return false;
		if (milkNo != other.milkNo)
			return false;
		if (rowMilkNo != other.rowMilkNo)
			return false;
		if (sterilizeFinishDate == null) {
			if (other.sterilizeFinishDate != null)
				return false;
		} else if (!sterilizeFinishDate.equals(other.sterilizeFinishDate))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "MilkTO [milkNo=" + milkNo + ", rowMilkNo=" + rowMilkNo
				+ ", capacity=" + capacity + ", disposal=" + disposal
				+ ", sterilizeFinishDate=" + sterilizeFinishDate + "]";
	}
}
